package com.apex.aolonfitdemo.ui;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.apex.aolonfit.AolonFitManager;
import com.apex.aolonfitdemo.R;
import com.apex.aolonfitdemo.databinding.ActivityTakeBinding;
import com.apex.ax_bluetooth.core.EABleManager;
import com.apex.ax_bluetooth.enumeration.EABleConnectState;
import com.cyber.bridge.module.listener.OnCyberCameraListener;

public class TakeActivity extends AppCompatActivity {
    ActivityTakeBinding activityTakeBinding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activityTakeBinding = ActivityTakeBinding.inflate(getLayoutInflater());
        setContentView(activityTakeBinding.getRoot());
        activityTakeBinding.tool.setNavigationIcon(R.mipmap.exit_page);
        setSupportActionBar(activityTakeBinding.tool);
        getSupportActionBar().setTitle(null);
        activityTakeBinding.tool.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        AolonFitManager.getInstance().setOnCameraListener(new OnCyberCameraListener() {
            @Override
            public void enterCamera() {
                Log.e("TakeActivity", "enterCamera");

            }

            @Override
            public void exitCamera() {
                Log.e("TakeActivity", "exitCamera");
            }

            @Override
            public void takePhoto() {
                Log.e("TakeActivity", "takePhoto");
            }
        });
        activityTakeBinding.submit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                    AolonFitManager.getInstance().enterCamera();

            }
        });
        activityTakeBinding.cancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                    AolonFitManager.getInstance().exitCamera();

            }
        });
    }
}
